import tensorflow as tf
import numpy as np
import os


def mish(x):
    return x * tf.tanh(tf.math.softplus(x))


def gen_golden_data_simple():
    input_x = np.random.uniform(-1, 1, [32]).astype(np.float16)
    res = mish(input_x)
    golden = res.numpy().astype(np.float16)
    os.system("mkdir -p input")
    os.system("mkdir -p output")
    input_x.tofile("./input/input_x.bin")
    golden.tofile("./output/golden.bin")


if __name__ == "__main__":
    gen_golden_data_simple()
